package com.htgd.gardenexpo.service;

import com.htgd.gardenexpo.dto.GeConReservationDTO;
import com.htgd.gardenexpo.entity.GeConReservation;
import com.htgd.gardenexpo.entity.PageQuery;
import com.htgd.gardenexpo.vo.ReservationDetails;
import com.htgd.gardenexpo.vo.ReserveList;

import java.util.List;
import java.util.Map;

/**
 * 预约入园(GeConReservation)表服务接口
 *
 * @author makejava
 * @since 2021-06-21 17:55:01
 */
public interface GeConReservationService {

    /**
     * 通过ID查询单条数据
     *
     * @param reservationId 主键
     * @return 实例对象
     */
    GeConReservation queryById(Integer reservationId);

    /**
     * 查询多条数据
     *
     * @param offset 查询起始位置
     * @param limit  查询条数
     * @return 对象列表
     */
    List<GeConReservation> queryAllByLimit(int offset, int limit);
    List<Map<String,Object>> getDataByDay(String nowDay);
    List<Map<String,Object>> getDataByWeek(String monday,String sunday);
    List<Map<String,Object>> getDataByMonth(String firstDay,String lastDay);
    List<GeConReservation> queryAllReservationsByValue(PageQuery pageQuery);
    List<GeConReservation> getInfoByValue(String openId, String date, Integer venueId);

    /**
     * 新增数据
     *
     * @param geConReservation 实例对象
     * @return 实例对象
     */
    GeConReservation insert(GeConReservation geConReservation);

    /**
     * 修改数据
     *
     * @param geConReservation 实例对象
     * @return 实例对象
     */
    GeConReservation update(GeConReservation geConReservation);

    /**
     * 通过主键删除数据
     *
     * @param reservationId 主键
     * @return 是否成功
     */
    boolean deleteById(Integer reservationId);

    String addreserve(GeConReservationDTO geConReservationDTO, String openId);

    ReservationDetails reservedetails(int reservationId);

    List<ReserveList> reservelist(PageQuery pageQuery, String openId);

    long getTotalByDate(String date, Integer venueId);
}
